FROM node:12-alpine

WORKDIR /root/www

RUN npm config set registry https://registry.npm.taobao.org && npm i express -g

RUN mkdir node_modules && mv /usr/local/lib/node_modules/express node_modules

COPY . .

RUN rm -rf Dockerfile

EXPOSE 80

CMD ["node", "main.js"]
